#ifndef __PLAYER_H
#define __PLAYER_H

/*
	PLAYER.H

	The CPlayer class

	OpenGL Game Programming
	Author: Kevin Hawkins
	Date: 3/30/2001
	Description:
*/

#include "object.h"

class CCamera;
class CTerrain;
class CDirectXAudio;

class CPlayer : public CObject
{
private:
	CCamera *camera;
	CTerrain *terrain;
	CDirectXAudio *audioSys;
	bool isFiringLightbeam;
	float lightbeamDamageTimeout;
	clock_t start;
	
protected:
	void OnCollision(CObject *collisionObject);
	void OnPrepare();

public:
	float direction;	// direction player is facing (same as camera)
	float pitch;		// pitch of player's lookAt vector

	CPlayer();
	~CPlayer();

	void SetCamera(CCamera *c);
	void DetachCamera();

	void SetTerrain(CTerrain *t);
	void StartWeapon();
	void OnWeaponFire();
	void EndWeapon();
	void LaunchSnowBall();
	void SetAudioSystem(CDirectXAudio *aSys);
	void DoAnimate(float deltaTime);
};

#endif